//
//  BSLWebView.h
//  demo
//
//  Created by RYAN on 15/8/4.
//
//

#import <UIKit/UIKit.h>
#import "UIColor+helper.h"
#import "UIView+RSAdditions.h"
#import "MaskView.h"

#define K_DEFAULT_BOUNCE_BG_HEIGHT 100

UIKIT_EXTERN NSString *const BSLWebViewDidDismissNotification;
UIKIT_EXTERN NSString *const BSLWebViewDidShowNotification;
UIKIT_EXTERN NSString *const BSLWebViewDidHideNotification;
UIKIT_EXTERN NSString *const BSLWebViewDidCloseNotification;

@interface BSLWebView : UIWebView

@property (nonatomic, strong) NSString *viewID;
@property (nonatomic, strong) NSURL *viewURL;
@property (nonatomic, assign) BOOL shouldHide;
@property (nonatomic, assign) int zindex;//堆叠顺序值

@property (nonatomic, weak)   UIView *browserView;//UIWebView上UIWebBrowserView
@property (nonatomic, weak)   UIImageView *bounceBackgroundView;

@property (nonatomic, strong) NSString *mask;

@property (nonatomic, assign, readonly) BOOL shouldMargin;
@property (nonatomic, strong) NSString *marginStyle;

@property (nonatomic, assign) BOOL opacity;
@property (nonatomic, assign) BOOL shouldScale;
@property (nonatomic, assign) BOOL shouldBounces;

/**
 *  设置视图的styles
 *
 *  @param styles 字典类型
 */
- (void)setStyle:(NSDictionary *)style;

/**
 *  设置滑动后的对webview的操作
 *
 *  @param popGesture 取值"none","close","hide"
 */
- (void)setPopGesture:(NSString *)popGesture;

/**
 *  设置滚动条
 *
 *  @param indicator 取值"all(默认)","vertical","horizontal","none"
 */
- (void)setIndicator:(NSString *)indicator;

/**
 *  点击设备的状态栏时是否滚动返回至顶部
 *
 *  @param shouldScrollToTop 默认为YES
 */
- (void)setScrollToTop:(BOOL)shouldScrollToTop;
/**
 *  弹出视图，并判断是否有动画，有则加上动画效果，无则无动画
 *
 *  @param animation 动画名称，默认none
 *  @param duration  动画时间，单位ms
 */
//- (void)setShowAnimation:(NSString *)animation duration:(NSNumber *)duration;
/**
 *  隐藏视图，并判断是否有动画，有则加上动画效果，无则无动画
 *
 *  @param animation 动画名称，默认none
 *  @param duration  动画时间，单位ms
 */
//- (void)setHideAnimation:(NSString *)animation duration:(NSNumber *)duration;
/**
 *  删除视图，并判断是否有动画，有则加上动画效果，无则无动画
 *
 *  @param animation 动画名称，默认none
 *  @param duration  动画时间，单位ms
 */
//- (void)setCloseAnimation:(NSString *)animation duration:(NSNumber *)duration;
@end